Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use listmode time frame for output frame definition if all events are used #1519

Merged
merged 7 commits into from
Nov 19, 2024

Conversation

danieldeidda
Copy link
Collaborator

@danieldeidda danieldeidda commented Oct 2, 2024

use interfile information for frame difinition if all event are used,… throwing a warning otherwise

Changes in this pull request

use interfile information for frame difinition if all event are used,… throwing a warning otherwise

Testing performed

yes

Related issues

--fixes #1512

Checklist before requesting a review

  • [v] I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • [v] The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

@KrisThielemans
Copy link
Collaborator

most jobs were ok, but one
https://github.com/UCL/STIR/pull/1519/checks#step:17:1059
can you check the log file (downloadable from the Actions page).

Also, clang-format issues.

@KrisThielemans
Copy link
Collaborator

Can be reproduced by using the following .par file

lm to projdata parameters :=
input file := root_header.hroot
template projdata := template_for_ROOT_scanner.hs
frame definition file :=
num events to store := 0
output filename prefix := my_sinogram_counts_TOF

maximum absolute segment number to process := 3
do pre normalisation := 0
num tof bins in memory := 5
num segments in memory := 7
store prompts := 1
store delayeds := 0
list event coordinates := 0
end :=

and

INPUT_ROOT_FILE=test_PET_GATE.root lm_to_projdata my_lm_to_projdata_counts_TOF.par

which results in

Last stored event was recorded before time-tick at 0 secs
Total number of counts (either prompts/trues/delayeds) stored: 0

This is probably due to the fact that the .hroot file does not contain any time info, so we might need to check if the time from th elm file is valid or not.

@KrisThielemans KrisThielemans added this to the v6.3 milestone Oct 30, 2024
@KrisThielemans
Copy link
Collaborator

The ROOT job worked fine, but I've cancelled the rest of the workflow as the merge commit will run everything again anyway. Hopefully that'll work ok.

documentation/release_6.3.htm Outdated Show resolved Hide resolved
</li>
<li>
<tt>stir_timings</tt> has now an extra option to parse a par-file for a projector-pair.
</li>
<li>
Duration in sinogram interfile/exam_info obtained from lm_to_projdata has the correct value if we unlist all the events. This is not true for Root files
<a href=https://github.com/UCL/STIR/pull/1503>PR #1503</a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has to be 1519. Also, please use ROOT, use <tt>lm_to_projdata</tt> and put a <br> after that line.

Copy link
Collaborator

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! squash-merge ok here? (we went back-and-forth a bit).

@KrisThielemans KrisThielemans changed the title use interfile information for frame difinition if all event are used,… use listmode time frame for output frame definition if all events are used Nov 19, 2024
@danieldeidda
Copy link
Collaborator Author

thanks! squash-merge ok here? (we went back-and-forth a bit).

sure

@KrisThielemans KrisThielemans merged commit 4b87c30 into UCL:master Nov 19, 2024
8 checks passed
@KrisThielemans KrisThielemans self-assigned this Nov 19, 2024
KrisThielemans added a commit to Dimitra-Kyriakopoulou/STIR that referenced this pull request Nov 20, 2024
… used (UCL#1519)

use the time frame information (where available) for the listmode data
to set the frame definition for the output of LmToProjData if all events
are used, issuing a warning otherwise

---------

Co-authored-by: Kris Thielemans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lmtoprojdata image duration dpends on time frame definitions
2 participants